const ffmpeg = require('fluent-ffmpeg');

getMetadata("/home/yi/Videos/eyGhUQCC.ts").then(v=>{
    console.dir(v)
})

//video_path -> Promise<metadata>
function getMetadata(filePath) {
    return new Promise((resolve, reject) => {
        ffmpeg.ffprobe(filePath, function (err, metadata) {
            if (err) return reject(err)
            resolve(metadata)
        });
    })
}
